package org.budo.sharding.proxy.recognizer;

import java.util.Collection;

import org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.recognizer.spi.JDBCDriverURLRecognizer;
import org.budo.support.lang.util.ListUtil;

import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author lmw
 */
@Getter
@NoArgsConstructor
public class BudoShardingJdbcUrlRecognizer implements JDBCDriverURLRecognizer {
    private Collection<String> URLPrefixes;

    private String driverClassName;

    public BudoShardingJdbcUrlRecognizer(String[] urlPrefix, String driverClassName) {
        this.URLPrefixes = ListUtil.toStringList(urlPrefix);
        this.driverClassName = driverClassName;
    }

    @Override
    public String getDatabaseType() {
        throw new RuntimeException("#30 this=" + this);
    }
}